﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
//using Oracle.DataAccess.Client;
using System.Configuration;
//using System.Data.Entity.Infrastructure;
using System.ComponentModel.DataAnnotations;
using DslamPort.Models;
using System.Collections.ObjectModel;
using System.Web.Mvc;
using System.Data.OracleClient;
using System.Data;

namespace DslamPort.Models
{
    public class Dslam_TypeModel
    {
        public int id { get; set; }
        public string name { get; set; }

        public List<Dslam_TypeModel> getDslam_Type()
        {
            List<Dslam_TypeModel> Dslam_Type_ = new List<Dslam_TypeModel>();
            var odr = BaseClass.Lib_GetDataReader("select * from dslam_type");
            foreach (DataRow item in odr.Rows)
            {
                Dslam_Type_.Add(new Dslam_TypeModel
                {
                    id = Convert.ToInt32(item["id"].ToString()),
                    name = item["name"].ToString()

                });

            }
            return Dslam_Type_;
        }
        public List<Dslam_TypeModel> getDslam_Type_gpon()
        {
            List<Dslam_TypeModel> Dslam_Type_ = new List<Dslam_TypeModel>();

            Dslam_Type_.Add(new Dslam_TypeModel
            {
                id = 7,
                name = "GPON HUAWEI"

            });
            Dslam_Type_.Add(new Dslam_TypeModel
            {
                id = 8,
                name = "GPON ZTE"

            });
            return Dslam_Type_;
        }
        public List<Dslam_TypeModel> getDslam_Type_QUANG()
        {
            List<Dslam_TypeModel> Dslam_Type_ = new List<Dslam_TypeModel>();
            
                Dslam_Type_.Add(new Dslam_TypeModel
                {
                    id = 2,
                    name = "Mini"

                });
                Dslam_Type_.Add(new Dslam_TypeModel
                {
                    id = 4,
                    name = "FTTH"

                });
            return Dslam_Type_;
        }
    }
    
}
